package main

import "strings"

func main() {
	findWords([]string{"Hello", "Alaska", "Dad", "Peace"})
}

func findWords(words []string) []string {
	var ret []string
	line1 := "QWERTYUIOPqwertyuiop"
	line2 := "ASDFGHJKLasdfghjkl"
	line3 := "ZXCVBNMzxcvbnm"
	for _,value := range words {
		locationLines := make(map[string]int)
		for _, val := range value {
			if strings.ContainsRune(line1, val) {
				locationLines[line1] = 0
			}
			if strings.ContainsRune(line2, val) {
				locationLines[line2] = 0
			}
			if strings.ContainsRune(line3, val) {
				locationLines[line3] = 0
			}
		}
		if len(locationLines) == 1 {
			ret = append(ret, value)
		}
	}
	return ret
}
